package test;

import com.xcc.httpUtils.HttpUtils;
import com.xcc.httpUtils.callback.StringHttpCallBack;
import okhttp3.Call;

import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;

/**
 * Created by Carman
 * <p>
 * Date: 2018/11/26 - 15:33
 * <p>
 * 描述:
 */
public class ssl {

    public static void main(String[] args){
        try {
            ssl();
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        } catch (KeyManagementException e) {
            e.printStackTrace();
        }
    }

    public static void ssl() throws NoSuchAlgorithmException, KeyManagementException {
        HttpUtils.build().ssl().init();

        HttpUtils.post("https://video.fiibeacontest.xyz/IDPS-IMS/baseApi").build().executeCallBack(new StringHttpCallBack() {
            @Override
            public void requestSuccess(Call call, String s) {
                System.out.println(s);
            }

            @Override
            public void requestError(Call call, Exception e) {
                super.requestError(call, e);
                e.printStackTrace();
            }
        });
    }
}
